You don’t have to use mozzarella; other fresh cheeses like ricotta, goat, or feta will work, though you might miss that stretchy molten-cheese effect.
Step 1
Preheat the oven to 350°. Toast pistachios on a rimmed baking sheet, tossing once, until golden brown, 5–8 minutes. Let cool, then finely chop. Reduce oven temperature to 325°.
Step 2
Slice about ½" off the top of each tomato; reserve tops. Using a spoon, scoop out the center of each tomato (save for making sauce). Season the insides of tomatoes with salt and pepper. Transfer to a baking dish large enough to hold tomatoes (they can be snug).
Step 3
Mix pistachios, garlic, raisins, ¼ cup oil, and 1 Tbsp. thyme in a medium bowl; season with salt and pepper. Place about 1 Tbsp. filling in each tomato. Tear mozzarella into bite-size pieces and snuggle into tomatoes. Top with remaining filling (you may need to gently press filling down with your fingers).
Step 4
Replace tomato tops; drizzle with oil. Scatter thyme sprigs over and bake, uncovered, until tomatoes release some liquid and begin to get a little wrinkly on top, 35–45 minutes. Let cool slightly before serving.